package com.sds.sweng.swat.miplatform.ui.design.models.component;

import org.apache.commons.lang.StringUtils;



public class MGridBody extends MGridCell {

	public static final int DEFAULT_HEIGHT = 24;

	private String colid = StringUtils.EMPTY;
	private String format = StringUtils.EMPTY;
	private String edit = StringUtils.EMPTY;
	private String dataType = "STRING";
	private int size = 256;

	public MGridBody() {
		this(StringUtils.EMPTY, 0);
	}

	public MGridBody(String colid, int col) {
		this(colid, col, 1, 1, 1);
	}

	public MGridBody(String colid, int col, int row, int colspan, int rowspan) {
		super(col, row, colspan, rowspan, HALIGN_LEFT, VALIGN_MIDDLE);

		this.colid = colid;
		this.format = FORMATS[0];
		this.display = DISPLAYS[0];
		this.edit = EDITS[0];
	}

	public MGridBody clone() {
		MGridBody clone = (MGridBody) super.clone();
		clone.setColid(getColid());
		clone.setFormat(getFormat());
		clone.setEdit(getEdit());
		clone.setDataType(getDataType());
		clone.setSize(getSize());

		return clone;
	}

	public String getColid() {
		return colid;
	}

	public void setColid(String colid) {
		this.colid = colid;
	}

	public String getFormat() {
		return format;
	}

	public void setFormat(String format) {
		this.format = format;
	}

	public String getEdit() {
		return edit;
	}

	public void setEdit(String edit) {
		this.edit = edit;
	}

	public String getDataType() {
		return dataType;
	}

	public void setDataType(String dataType) {
		this.dataType = dataType;
	}

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		this.size = size;
	}

}
